#ifndef __COMM_H__
#define __COMM_H__

#include <iostream>
#include <string>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <cstdio>
#include <cstring>

#define SIZE 1024
#define FILE_NAME "myfifo"


using namespace std;

class InIt
{
public:
    InIt()
    {
        if(mkfifo(FILE_NAME, 0666) < 0)
	    {
            perror("comm.h::mkfifo");
            exit(0);
    	}
    }

    ~InIt()
    {
        if(unlink(FILE_NAME) < 0)
        {
            printf("return success!\n");
        }
    }
};

#endif